
var showInfo = function(){
		$("#operate").fadeOut();
		$("#modify").fadeIn();
		$("#userinfo table tr td:nth-of-type(2)").fadeOut();
		$("#userinfo table tr td:nth-of-type(3)").fadeIn();
	}
$(function(){
	//$(".registerform").Validform();  //就这一行代码！;
		
	var demo=$("#userinfo").Validform({
		btnSubmit:"#submit",
		tiptype:3,
		showAllError:true,
		ajaxPost:true,
		datatype:{
			"card1":/^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$/,
			"card2":/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/,
		},
		callback:function(data){

			console.log(data);
			showInfo();
		},
	});
	$("#operate").fadeOut(0.001);
	
	
	
	$("#modify").click(function modify(){
		$("#userinfo table tr td:nth-of-type(2)").fadeIn();
		$("#userinfo table tr td:nth-of-type(3)").fadeOut();
		$("#modify").fadeOut();
		$("#operate").fadeIn();
	});
	$("#operate .btn-default").click(showInfo());
})
